﻿<Application x:Class="Demo.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:controls="clr-namespace:Thinktecture.DataForm.Controls;assembly=Thinktecture.DataForm"
             StartupUri="MainWindow.xaml">

    <Application.Resources>
        <ResourceDictionary>

            <SolidColorBrush x:Key="WindowBackgroundBrush" Color="White" />

            <!--custom busy indicator template-->
            <ControlTemplate x:Key="CustomBusyIndicatorTemplate">
                <Canvas x:Name="LayoutRoot" Opacity="0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" 
                        VerticalAlignment="Center" Width="67.507" Height="67.505" >
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="CommonStates">
                            <VisualState x:Name="Normal">
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="LayoutRoot"
											             Storyboard.TargetProperty="Opacity" 
											             From="1" To="0" Duration="0:0:.25" />
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="IsBusy">
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="path">
                                        <EasingDoubleKeyFrame KeyTime="0:0:1" Value="360"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimation Storyboard.TargetName="LayoutRoot" 
											             Storyboard.TargetProperty="Opacity" 
											             From="0" To="1" Duration="0:0:.25" />
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Path x:Name="path" Fill="#FFF4F4F5" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" 
			              Width="67.507" Height="67.505" StrokeStartLineCap="Round" Stretch="Fill" StrokeEndLineCap="Round"
			              Stroke="Black" StrokeThickness="7.5">
                        <Path.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </Path.RenderTransform>
                        <Path.Data>
                            <PathGeometry>
                                <PathFigure IsFilled="False" StartPoint="33.7545515651512,2.5">
                                    <BezierSegment IsSmoothJoin="True" Point3="64.7372564596765,29.6711267211754" Point2="62.6903086676469,14.1230286953044" Point1="49.4368005695609,2.5"/>
                                    <BezierSegment IsSmoothJoin="True" Point3="41.8426542652398,63.9353415063249" Point2="56.9905476985608,59.8764713303695" Point1="66.7841969157382,45.2192265810402"/>
                                    <BezierSegment IsSmoothJoin="True" Point3="4.88326753369369,45.7089615904412" Point2="10.884600056909,60.1974862540696" Point1="26.6947663338948,67.9942043463054"/>
                                    <BezierSegment Point3="18.1295267784812,6.68671696075216" Point2="4.5482999026164,14.5278470447629" Point1="-1.11806544801963,31.2204369268128"/>
                                </PathFigure>
                                <PathFigure StartPoint="18.5880072744978,6.25">
                                    <LineSegment Point="16.2539927255022,16.9160018093636"/>
                                </PathFigure>
                                <PathFigure StartPoint="16.922007161258,5.25">
                                    <LineSegment Point="5.9220123800248,5.25"/>
                                </PathFigure>
                            </PathGeometry>
                        </Path.Data>
                    </Path>
                </Canvas>
            </ControlTemplate>

        </ResourceDictionary>
    </Application.Resources>
</Application>
